<template>
	<view class="userLayout pageBg">
		<view class="userInfo">
			<view class="avatar">
				<image src="/static/images/xiaobai.jpg" mode=""></image>
			</view>
			<view class="nickName">1276178886@qq.com</view>
			<view class="address">来自：山东</view>
		</view>
		<view class="section">
			<view class="list">
				<view url="/pages/list/list" class="row" @click="golist">
					<view class="left">
						<uni-icons type="download" size="25" color="#28b389"></uni-icons>
						<view class="text"> 我的下载 </view>
				 	    </view>
					    <view class="right">
						<view class="text">3</view>
						<uni-icons type="right" size="18" color="#aaa"></uni-icons>
					</view>
				</view>
				
				<view class="row">
					<view class="left">
						<uni-icons type="star" size="25" color="#28b389"></uni-icons>
						<view class="text"> 我的评分 </view>
					</view>
					<view class="right">
						<view class="text">3</view>
						<uni-icons type="right" size="18" color="#aaa"></uni-icons>
					</view>
				</view>
				<view class="row">
					<view class="left">
						<uni-icons type="chatboxes" size="25" color="#28b389"></uni-icons>
						<view class="text">联系客服 </view>
						<!-- #ifdef MP -->
						<button open-type="contact">联系客服</button>
						<!-- #endif -->
						<!-- #ifndef MP -->
						<button @click="callPhone">拨打电话</button>
						<!-- #endif -->
					</view>
					<view class="right">
						<uni-icons type="right" size="18" color="#aaa"></uni-icons>
					</view>
				</view>
			</view>
		</view>
		<view class="section">
			<view class="list">
				<view class="row">
					<view class="left">
						<uni-icons type="notification" size="25" color="#28b389"></uni-icons>
						<view class="text"> 订阅中心 </view>
					</view>
					<view class="right">
						<uni-icons type="right" size="18" color="#aaa"></uni-icons>
					</view>
				</view>
				<view class="row">
					<view class="left">
						<uni-icons type="map-filled" size="25" color="#28b389"></uni-icons>
						<view class="text"> 常见问题 </view>
					</view>
					<view class="right">
						<uni-icons type="right" size="18" color="#aaa"></uni-icons>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script lang="ts" setup>
	const callPhone = () => {
		uni.makePhoneCall({
			phoneNumber: '114' //仅为示例
		});
	}
	
	const golist =()=>{
		uni.navigateTo({
			url: '/pages/list/list',
		});
	}
</script>

<style lang="scss" scoped>
	.userInfo {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		padding: 50rpx 0;

		.avatar {
			width: 160rpx;
			height: 160rpx;
			border-radius: 50%;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}

		}

		.nickName {
			margin: 30rpx 0;
			font-size: 40rpx
		}

		.address {
			color: #999;
		}

	}

	.section {
		width: 690rpx;
		margin: 50rpx auto;
		border: 1px solid #eee;
		border-radius: 10rpx;
		box-shadow: 0 0 30rpx rgba(0, 0, 0, 0.05);

		.row {
			position: relative;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 30rpx;
			height: 100rpx;
			border-bottom: 1px solid #eee;
			background: #fff;

			&:last-child {
				border-bottom: none;
			}

			button {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100rpx;
				opacity: 0;
			}

			.left {
				display: flex;
				align-items: center;

				.text {
					color: #666;
					// color: $brand-theme-color;
					padding-left: 30rpx;

				}
			}

			.right {
				display: flex;
				align-items: center;
			}
		}

	}
</style>